package com.stefanini.pe.bbva.mbl.in.dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.stefanini.pe.bbva.mbl.carga.in.to.LogLogin;
import com.stefanini.pe.bbva.mbl.in.dao.iface.LogLoginDAO;

import org.apache.log4j.Logger;

public class LogLoginDAOImpl extends SqlMapClientDaoSupport implements LogLoginDAO {

    public LogLoginDAOImpl() {
        super();
    }

    public void insert_ok(LogLogin record) {
    	logger.info("Inicio");
    	
        getSqlMapClientTemplate().insert("LOG_LOGIN.ibatorgenerated_insert_ok", record);
        
        logger.info("Fin");
    }

    public void insert_error(LogLogin record) {
    	logger.info("Inicio");
    	
        getSqlMapClientTemplate().insert("LOG_LOGIN.ibatorgenerated_insert_error", record);
        
        logger.info("Fin");
    }

	
    public List selectByCriteria(LogLogin record)  {
    	List records = null;
    	
    	logger.info("Inicio");
    	
    	records = (List) getSqlMapClientTemplate().queryForList("LOG_LOGIN.ibatorgenerated_selectByCriteria",record);
    	
    	logger.info("Fin");
    	
    	return records;
	}
}